import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
// 获取环境变量，Vite 会自动替换这里的值
const base = import.meta.env.VITE_BASE_URL || '/'
const router = createRouter({
  history: createWebHistory(base),
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
    },
    {
      path: '/shopping',
      name: 'Shopping',
      component: () => import('@/views/Shopping.vue'),
    },
    {
      path: '/live',
      name: 'Live',
      component: () => import('@/views/Live.vue'),
    },
    {
      path: '/my',
      name: 'My',
      component: () => import('@/views/My.vue'),
    },
  ],
})
export default router
